package com.mondo.financialwallet.presentation.model;

public class ProductProfitDataModel {

    private float profit;

    private String date;

    public ProductProfitDataModel(String profit, String date){
        if(profit == null){
            this.profit = 0;
        } else {
            this.profit = Float.parseFloat(profit);
        }

        if (date != null){
            this.date = date.substring(date.indexOf("-") + 1, date.length());
        }
    }

    public float getProfit() {
        return profit;
    }

    public String getDate() {
        return date;
    }
}
